<script type="text/javascript" src="js/jquery/infowindow.js"></script>
<script type="text/javascript">
	$(document).ready(function(){
		$("#txtSearch").autocomplete({
			source: "query/input-search.php",
			minLength: 2,
			search: function(event, ui) {
				$("#txtSearch").css("color","black");
			},
			open: function() {
				$("#txtSearch").css("color","white");
				$( this ).removeClass( "ui-corner-all" ).addClass( "ui-corner-top" );
			},
			close: function() {
				$("#txtSearch").css("color","white");
				$( this ).removeClass( "ui-corner-top" ).addClass( "ui-corner-all" );
			}
		});
		
		$("#button_search").click(function(e){
			e.preventDefault();
			var search = $("#txtSearch").val();
			if(!search){ return false; }
			
			$.post("query/search.php", {search: search}, function(result){
				var txt = '';
				$.each(result, function(key, val){
					txt += val;
				});
				
				txt = txt.replace(/[`~!@#$%^&()_+\=?;'<>\{\}\[\]\\\/]/gi, '');
				txt = txt.replace(/","/g, "*");
				txt = txt.replace(/"/g, "");
				window.location.replace("panel.php?page=result&data="+txt);
			});
			
		});
	});
</script>
<!-- Start: page-top-outer -->
<div id="page-top-outer">    

<!-- Start: page-top -->
<div id="page-top">
	<!-- start logo -->
	<div id="logo">
	<a href=""><img src="images/shared/logo.png" alt="" /></a>
	</div>
	<!-- end logo -->
	
	<!--  start top-search -->
	
	<form name="login" action="query/register.php" onsubmit="return validateForm()" method="post">
		
		<div id="top-search">
			<table border="0" cellpadding="0" cellspacing="0">
			<tr>
				<td></td>
			</tr>
			<tr>
			<td><input type="text" id="txtSearch" placeholder="Enter search here." class="top-search-inp" /></td>
			<td>
			<input type="image" id="button_search" src="images/shared/top_search_btn.gif"  />
			</td>
			</tr>
			</table>
		</div>
	</form>
 	<!--  end top-search -->
 	<div class="clear"></div>

</div>
<!-- End: page-top -->

</div>
<!-- End: page-top-outer -->
	
<div class="clear">&nbsp;</div>
 
<!--  start nav-outer-repeat................................................................................................. START -->
<div class="nav-outer-repeat"> 
<!--  start nav-outer -->
<div class="nav-outer"> 

		<!-- start nav-right -->
		<div id="nav-right">
			<div class="nav-divider">&nbsp;</div>
			<div class="showhide-account"><img src="images/shared/nav/nav_myaccount.gif" width="93" height="14" alt="" /></div>
			<div class="nav-divider">&nbsp;</div>
			<a href="template/logout.php" id="logout"><img src="images/shared/nav/nav_logout.gif" width="64" height="14" alt="" /></a>
			<div class="clear">&nbsp;</div>
		
			<!--  start account-content -->	
			<div class="account-content">
			<div class="account-drop-inner">
				<a href="" id="acc-settings">Settings</a>
				<div class="clear">&nbsp;</div>
				<div class="acc-line">&nbsp;</div>
				<a href="" id="acc-details">Personal details </a>
				<div class="clear">&nbsp;</div>
				<div class="acc-line">&nbsp;</div>
				<a href="" id="acc-project">Project details</a>
				<div class="clear">&nbsp;</div>
				<div class="acc-line">&nbsp;</div>
				<a href="" id="acc-inbox">Inbox</a>
				<div class="clear">&nbsp;</div>
				<div class="acc-line">&nbsp;</div>
				<a href="" id="acc-stats">Statistics</a> 
			</div>
			</div>
			<!--  end account-content -->
		
		</div>
		<!-- end nav-right -->


		<!--  start nav -->
		<div class="nav">
		
		<div class="table">
		<?php
		if($_SESSION['account_type']=='root'){
		echo"<ul class='select'><li><a href='panel.php?page=city'><b>Manage Cities</b><!--[if IE 7]><!--></a><!--<![endif]-->
		<!--[if lte IE 6]><table><tr><td><![endif]-->
	
		<!--[if lte IE 6]></td></tr></table></a><![endif]-->
		</li>
		</ul>
		
		<div class='nav-divider'>&nbsp;</div>
	
		<ul class='select'><li><a href='panel.php?page=affiliate'><b>Manage Affiliates</b><!--[if IE 7]><!--></a><!--<![endif]-->
		<!--[if lte IE 6]><table><tr><td><![endif]-->
		<div class='select_sub'>
		
		</div>
		<!--[if lte IE 6]></td></tr></table></a><![endif]-->
		</li>
		</ul>
	
		
		<div class='nav-divider'>&nbsp;</div>
			
		<ul class='select'><li><a href='panel.php?page=manage_user'><b>Manage Users </b><!--[if IE 7]><!--></a><!--<![endif]-->
		<!--[if lte IE 6]><table><tr><td><![endif]-->
		
		<!--[if lte IE 6]></td></tr></table></a><![endif]-->
		</li>
		</ul>
		
		<div class='nav-divider'>&nbsp;</div>
		
		<ul class='select'><li><a href='panel.php?page=ralimo_rates''><b>Manage Ralimo Rates </b><!--[if IE 7]><!--></a><!--<![endif]-->
		<!--[if lte IE 6]><table><tr><td><![endif]-->
		
		<!--[if lte IE 6]></td></tr></table></a><![endif]-->
		</li>
		</ul>
		
		<div class='nav-divider'>&nbsp;</div>
		
		<ul class='select'><li><a href='panel.php?page=remarks'><b>Remarks </b><!--[if IE 7]><!--></a><!--<![endif]-->
		<!--[if lte IE 6]><table><tr><td><![endif]-->
		
		<!--[if lte IE 6]></td></tr></table></a><![endif]-->
		</li>
		</ul>
		
		<div class='clear'></div>
		</div>";
		}else{
		echo"<ul class='select'><li><a href='panel.php?page=city'><b>Manage Cities</b><!--[if IE 7]><!--></a><!--<![endif]-->
		<!--[if lte IE 6]><table><tr><td><![endif]-->
	
		<!--[if lte IE 6]></td></tr></table></a><![endif]-->
		</li>
		</ul>
		
		<div class='nav-divider'>&nbsp;</div>
	
		<ul class='select'><li><a href='panel.php?page=affiliate'><b>Manage Affiliates</b><!--[if IE 7]><!--></a><!--<![endif]-->
		<!--[if lte IE 6]><table><tr><td><![endif]-->
		<div class='select_sub'>
		
		</div>
		<!--[if lte IE 6]></td></tr></table></a><![endif]-->
		</li>
		</ul>

		<div class='nav-divider'>&nbsp;</div>
		
		<ul class='select'><li><a href='panel.php?page=ralimo_rates'><b>Manage Ralimo Rates </b><!--[if IE 7]><!--></a><!--<![endif]-->
		<!--[if lte IE 6]><table><tr><td><![endif]-->
		
		<!--[if lte IE 6]></td></tr></table></a><![endif]-->
		</li>
		</ul>
		
		<div class='nav-divider'>&nbsp;</div>
		
		<ul class='select'><li><a href='panel.php?page=remarks'><b>Remarks </b><!--[if IE 7]><!--></a><!--<![endif]-->
		<!--[if lte IE 6]><table><tr><td><![endif]-->
		
		<!--[if lte IE 6]></td></tr></table></a><![endif]-->
		</li>
		</ul>
		
		<div class='clear'></div>
		</div>";
		}
		?>
		<div class="clear"></div>
		</div>
		<!--  start nav -->

</div>
<div class="clear"></div>
<!--  start nav-outer -->
</div>